import java.util.Scanner;

public class Main1241 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n= sc.nextInt();
        int a=0;
        while (n!=1){
            if (n%2==0){
                n=n/2;
            }else if (n%2==1){
                n=n*3+1;
            }
            a++;
        }
        System.out.println(a);
    }
}
